package com.example.feign;

import com.example.utils.JsonData;
import com.example.vo.ProductVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @author yinxin
 * @version 1.0
 * @Description: 商品微服务调用feign接口
 * @date 2022/6/2310:18
 */
@Component
@FeignClient(name = "cloud-shop-service")
public interface ProductFeignService {


    @GetMapping("/api/product/v1/list")
    List<ProductVO> getInfo();

    /**
     * 获取流量包商品详情
     * @param id
     * @return
     */
    @GetMapping("/api/product/v1/detail/{product_id}")
    JsonData findDetailById(@PathVariable("product_id") Long id);
}
